package com.xqboss.apps.domain.punch;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xqboss.apps.domain.BaseTable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;

/**
 * <p>
 *     打卡削弱配置
 * </p>
 * @author Trent
 * @date 2023/8/25
 */
@Data
public class PunchWeakenConfig extends BaseTable {

    @Id
    @TableId()
    @JsonIgnore
    private Long id;

    /**
     * 耐久度占比
     */
    @ApiModelProperty("耐久度消耗比例")
    @NotNull(message = "请输入耐久度占比")
    @Positive(message = "耐久度占比值错误")
    @DecimalMax(value = "1.00", message = "耐久度占比不能超过100%")
    private BigDecimal durabilityRate;

    /**
     * 打卡收益占比
     */
    @ApiModelProperty("打卡收益衰减比例")
    @NotNull(message = "请输入打卡收益衰减比例")
    @Positive(message = "打卡收益衰减比例错误")
    @DecimalMax(value = "1.00", message = "打卡收益衰减比例不能超过100%")
    private BigDecimal incomeRate;
}
